package com.zhang.abstractFactory.example;

/**
 * @author ElloeStudy(Sifa Zhang)
 * @create 2022-03-01 19:19
 * To: 真常应物，真常得性，常清常静，常清静矣
 */
public class NvWa {
    public static void main(String[] args) {
        // 建立第一条生产线 ，男性生产线
        MaleHumanFactory maleHumanFactory = new MaleHumanFactory();

        // 建立第二条生产线 ，女性生产线
        FemaleHumanFactory femaleHumanFactory = new FemaleHumanFactory();

        // 开始从生产线里面生产产品
        Human maleYellowHuman = maleHumanFactory.createYellowHuman();

        Human FemaleYellowHuman = femaleHumanFactory.createYellowHuman();

        maleYellowHuman.cry();
        maleYellowHuman.talk();

        FemaleYellowHuman.cry();
        FemaleYellowHuman.laugh();
    }
}
